home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
PROGRAM
/
TP050392.ARJ
/
05-03-92.TPC
Wrap
Text File
|
1992-05-03
|
64KB
|
1,952 lines
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 01-01-00 00:00:00
From
To
Subject
--- WM v2.01/92-0100
* Origin: A.C.E. of Spades (615)383-4381 The B.A.N. board (1:116/33)
* Tossed by SFToss v1.00b on 92/04/09 12:01:00
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 04-26-92 05:02:05
From Trevor Carlsen
To Matt Heck
Subject Re: turbo pascal/turbo pascal profession
MH> Say, that IS useful... is there anything out now that is similar to
MH> the execution profiler?
The execution profiler is exceedingly useful when finetuning a program,especiall
when in the final stages of development.
Apart from the one that comes in the Professional package, there is another
(the same one I think) in Borland's Turbo Debugger and Tools package and Turbo
Power also market one in their Turbo Analyst package.
TeeCee
--- TC-ED v2.01
* Origin: The Pilbara's Pascal Centre (+61 91 732569) (3:690/644)
* Tossed by SFToss v1.00b on 92/04/26 16:02:14
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 04-26-92 05:07:00
From Trevor Carlsen
To Michael Stillwell
Subject Strings
MS> Is there some super duper way to create a string
MS> consisting of spaces?
procedure FillString(var st: string; len: byte; ch: char);
begin
st[0] := char(len);
FillChar(st[1],pred(len),ch);
end;
You would be well advised to find Eagle Software excellent shareware package
strg61a.* file and download it. It has a lot of very useful string routines
in it. The registered version is even better.
TeeCee
--- TC-ED v2.01
* Origin: The Pilbara's Pascal Centre (+61 91 732569) (3:690/644)
* Tossed by SFToss v1.00b on 92/04/26 16:02:14
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 04-26-92 05:31:38
From Trevor Carlsen
To Shelby Crane
Subject Re: Just some questions...
SC> One, if you have a statement such as 'I want to go home.' How
SC> would you use the pos function to return the position of the
SC> SECOND 't'... I always get the first 't' in want...
The best way is to find a copy of Eagle Software's strg61a.* package and use
the StrPos* function. It is fast and suitable. Otherwise -
function StrPos(var st: string; ch: char; nth: byte);
var
count,x : byte;
begin
count := 0;
x := 0;
while (x < length(st)) and (count < nth) do begin
inc(x);
if st[x] = ch then inc(count);
end;
StrPos := count;
end;
Untested... this is really the ideal sort of thing for assembler.
TeeCee
--- TC-ED v2.01
* Origin: The Pilbara's Pascal Centre (+61 91 732569) (3:690/644)
* Tossed by SFToss v1.00b on 92/04/26 16:02:15
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 04-26-92 05:41:59
From Trevor Carlsen
To John Gohde
Subject What Else On Tp
JG> No, I wrote it used to be simple.
> *[TP] is a great language and it is simple to learn too. I think it
> *always has been and always will be. I really can't foresee how the
> *addition of things such as Turbo Vision etc... could make the PASCAL
> *language more complicated. It is what it was and it was what it is.
> *If someone wants to learn
JG> Sure! I consider your reply to be a typical emotional response to
JG> any criticism of Borland.
JG> I think that the ideal simple TP was somewhere between version
JG> 4.0 and version 5.0. Version 4.0 enhanced with third party DOS
JG> functions is quite simple and workable (for a new user).
Try as I might, I fail to see where or how that reply could be construed as
"emotional". I would have called it factual.
Your criticism of recent versions is not based on facts. TP6 is no more complex
than TP4 except for the addition of three additional reserved words to cover
the use of OOP. Hardly a big difference.
You cannot *reasonably* include TV or OOP as justification for saying the
language is more complex for a beginner as firstly, TV is not part of the
language and secondly, OOP does not have to be used or learnt in order to
use the language in almost exactly the same way as you would have with TP4.
What Borland have done is to increase the usefulness and power for the power
user without affecting one zot how a beginner needs to approach his task.
And your statements on SBP+ need some clarification. Can object files created
for C libraries be linked *unchanged* into SBP+ compiled programs? I think
not, but I could be wrong. The reason I say this is because Pascal and C
have different calling conventions. If SB have solved that problem I applaud them.
TeeCee
--- TC-ED v2.01
* Origin: The Pilbara's Pascal Centre (+61 91 732569) (3:690/644)
* Tossed by SFToss v1.00b on 92/04/26 16:02:15
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 04-26-92 05:58:14
From Trevor Carlsen
To John Gohde
Subject Features Lacking In Tp
JG> Well, we have been over this before. Everyone has their own pet
JG> wants. For, me the most serious problem with TP is its
JG> restrictive .OBJ limitations. What you can link to TP is too
JG> restrictive. It would be nice to be able to link C Library .OBJs
JG> directly to TP (as you can with SBP+). But, not being able to
JG> link TP via an .OBJ file to fourth generation languages like
JG> DBase and other languages definitely classifies TP as
JG> mickey-mouse, in my book.
You are entitled to that opinion. I presume it means that you use SBP+ and
not TP. However I would swear that I saw a message from you somewhere in
the past that you were using the mickey-mouse language. If you do not like
something you should not buy it. By buying it you are being counter productive
or even perhaps hypocritical. A Market place flop is the surest possible
way to get the message across to big companies and I believe that Borland
would be no exception to this.
I believe that TP is by no means perfect. I consider it to be so far in front
of whatever comes second to be almost a joke, not because of Borland but because
no other company has delivered much needed competition yet. Twelve months
ago I wrote to SB requesting more information on SBP+. They ignored me. A
second letter six months later has also been ignored. Hardly what I would
call engendering confidence in a potential customer. Scott Samet's (or was
it Scott Sanbar) experience with them would tend to suggest that my experience
was not normal for them but it still makes me uneasy about purchasing the
product.
John nobody is forcing you to use TP or Borland products. Go buy something
else and use that. Discussion on them will be just as welcome here, if not
more so, as it will broaden our outlook and, hopefully, better inform us for
future purchasing decisions. However in order to be better informed we need
facts - not hysteria or paranoia.
TeeCee
--- TC-ED v2.01
* Origin: The Pilbara's Pascal Centre (+61 91 732569) (3:690/644)
* Tossed by SFToss v1.00b on 92/04/26 16:02:15
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 04-26-92 07:49:08
From Trevor Carlsen
To dj Murdoch
Subject TP6 "bug"
It appears that TP6 does not calibrate the delay procedure correctly when
used with a fast machine - eg a 486/33. I would assume that Borland would
be aware of this - are you?
The problem is quite serious as any programs written using the crt's delay
procedure become nearly unusable if delays are needed and thus every instance
where delay is used needs to be changed and rewritten. This is something
that I would expect a free fix for and not expect to pay for a fix via an
upgrade.
I post Borland's (Pacific) response here after I call them.
TeeCee
--- TC-ED v2.01
* Origin: The Pilbara's Pascal Centre (+61 91 732569) (3:690/644)
* Tossed by SFToss v1.00b on 92/04/26 16:02:15
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 04-26-92 09:08:44
From Dj Murdoch
To Trevor Carlsen
Subject Re: Help Needed with TP arrays
TC> Actually by declaring the array as large as is possible
TC> this cannot happen. However my view on that method is
TC> that it *might* allow a programmer to become complacent
TC> about writing range checking routines. By forcing him to
TC> turn off automatic range checking, I hope to increase the
TC> awareness of the need for code to do it. Either way the
TC> method can be deadly if no RC code is written and there is
TC> any possibility of out-of-range values.
That attitude seems to me to be exactly backwards. Most programs have no
range checking at all, because Borland defaults TP to $R-, and most people
can't be bothered to do it manually. If people did their programming with
$R+ always turned on, fewer bugs would make it out.
If you develop programs with the $R- option set, you deserve all the trouble
you can get when you miss doing one manual range check.
--- Msg V3.2
* Origin: Murdoch's Point: Waterloo, Ontario, Canada (1:221/177.40)
* Tossed by SFToss v1.00b on 92/04/27 09:00:49
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 04-26-92 09:22:16
From Dj Murdoch
To John Gohde
Subject Extended character set (was: Dezip)
JG> I tend to agree with you. Here, 99% of fido users use an IBM PC.
JG> So it ticks me off frankly that us IBM users are not allowed to
JG> use the IBM extended character set; apparently because somebody
JG> with a toy computer or some nut using an archaic 7-bit main frame
JG> might not be able to deal with these characters.
The extended characters aren't standard around the world. If you used them,
your messages wouldn't appear the same everywhere. Since this is an internation
l echo, that's a good enough reason to avoid them.
For example, from the current version of my TP bug list (to do my best to
stay on topic):
THistory.Draw uses characters 221 and 222 which are not standard outside codepag
437.
(On my machine, 221 and 222 are the thick vertical bars. In codepage 850,
a multilingual one commonly used in Europe, they're "|" and an accented "i".
In the Slavic code page 852, they're a block and an accented "T".)
--- Msg V3.2
* Origin: Murdoch's Point: Waterloo, Ontario, Canada (1:221/177.40)
* Tossed by SFToss v1.00b on 92/04/27 09:00:49
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 04-26-92 09:49:55
From Dj Murdoch
To Scott Sanbar
Subject Re: TPW patches
SS> I have a file for Turbo Pascal for Windows downloaded off
SS> compuserve. It has a patch for the IDE, various units and
SS> library code for OLE, TrueType and MM stuff as well as a
SS> new copy of WINDEBUG.DLL so the debugger will work,
SS> although not very well :(. This represents Borlands
SS> temporary patchwork for Windows 3.1 I guess until the next
SS> upgrade, which will hopefully not be too long.
SS> I got it off compuserve. If anyone wants it, I will make
SS> the 90K .zip available on my boss node for FREQ.
Is that TPWN31.ZIP, with files dated 6 April 92? If so, I "hatched" it to
PDN last week, so it should be available fairly widely by now. (I don't know
any PDN node except 1:221/177, in case anyone asks.)
--- Msg V3.2
* Origin: Murdoch's Point: Waterloo, Ontario, Canada (1:221/177.40)
* Tossed by SFToss v1.00b on 92/04/27 09:00:49
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 04-27-92 09:50:16
From Trevor Carlsen
To Jim Starke
Subject Procedures...
JS> {Untested Code!}
JS> Program Test ;
JS> Begin
JS> If ParamCount <> 3 then begin
JS> ClrScr ;
JS> WriteLN('To use this program you MUST have 3 arguments to show the');
JS> WriteLN('Program what you want it to do!') ;
JS> WriteLN('Test -A -B -C') ;
JS> Exit ; { Wrong Parameter count! Abort! }
JS> end ;
JS> ...
JS> ... { Program Code here. }
JS> ...
JS> End.
JS> Sure, there is a way around using the exit in this program but you
JS> would make it a lot less readable (I have been wrong before so I don't
JS> doubt I may be wrong here.). This way, you keep everything in one spot
JS> and it is very concise as to what the exit was/is for.
Bad example Jim. All the above requires to be absolutely readable is the
addition of three words - else begin { Program Code here } end;
However I agree with your method here, except that I would use halt not exit.
TeeCee
--- TC-ED v2.01
* Origin: The Pilbara's Pascal Centre (+61 91 732569) (3:690/644)
* Tossed by SFToss v1.00b on 92/04/27 18:58:43
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 04-27-92 00:00:04
From Terry Hughes
To John Reid
Subject Sorting records
JR> It was very similar to the sort that comes with Turbo Power's OPRO, but
JR> the OPRO sort only works if the file fits in memory.
JR> Borland no longer sells or supports it, even though the last (TP4)
JR> version works with TP6. You might find a dusty copy in some mail order
JR> house or a private individual might want to sell one. (I'd rather sell my
JR> keyboard.) It was about $100 new. Bonus: complete and highly readable
JR> source code was provided.
JR> Someone could do the Pascal community a big service by developing an OOP
JR> version of such a universal sort and offering it as shareware.
FWIW, our B-Tree Filer product has always included a merge sort
very similar in concept to the sort that Borland included with
its old Database Toolbox -- with the exception that ours is
much faster and is part of current product.
Our Windows System Library will include that same sort in
"psuedo OOP" for TPW programmers.
-Terry
* OLX 2.2 * TurboPower Software (voice 719-260-6641)
--- Maximus 2.01wb
* Origin: The Programmers Playhouse (1:128/60)
* Tossed by SFToss v1.00b on 92/04/28 07:58:37
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 04-27-92 00:00:08
From Terry Hughes
To Rene Seguin
Subject Question, Compression
RS> I think that pkZip/ARJ/etc. are all lz78/lzw (dictionary based)
RS> on +/- 4096 bytes blocks with huffman (redundancy coding) *after*.
RS> It makes no sense to me to make two passes with almost the same thing:
RS> huffman and Shannon who only differ in the way they build/evaluate
RS> there trees. As for common archivers, I think they do some statistics
RS> (probably using boyer-moore) on the stream before the first pass to
RS> speed thing a bit. Like that, they can bypass some evaluations during
RS> the real coding and perform some greedy fast hashcoding. And how damn
RS> fast do they do this!
I'm less familar with ZIP and ARJ but LHARC definitely uses a
two-stage compression. The first stage is an LZ sliding
dictionary on the input stream. The output from the sliding
dictionary is fed directly into a Huffman encoder. So, you get
the benefits of a two-stage compression while making only one
pass over the input data.
-Terry
* OLX 2.2 * TurboPower Software (voice 719-260-6641)
--- Maximus 2.01wb
* Origin: The Programmers Playhouse (1:128/60)
* Tossed by SFToss v1.00b on 92/04/28 07:58:37
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 04-26-92 21:57:00
From Norbert Igl
To Ryan Brown
Subject Printing (to screen) an ANSI array
> IMAGEDATA is [1..4000]
> for counter := 1 to 4000 do {counter is integer}
> begin
> write(IMAGEDATA[counter]);
> end;
> etc, etc, etc.eallocations.
Fascinating! How did you do this before Pascal had objects?!
>As you can see, the memory allocation is a pretty minor part of it.
Was the memory allocation done in "Matrix()"?
>The
>dynamic indexing is really ugly (I'd like to use "y[k,j]", but I'm stuck
>using "y^.r^[k]^.c[j]"), but I haven't found any way around that.
Why can't a future Pascal compiler translate "y[k,j]" to "y^.r^[k]^.c[j]"
for you? I've never used Fortran on a PC, but don't PC Fortran compilers
ermany, Norbert
---
* Origin: STOP READING! You're leaving the MSG-sector (2:241/5300.3)
* Tossed by SFToss v1.00b on 92/04/28 07:58:45
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 04-27-92 01:08:01
From Norbert Igl
To Jason Vaux
Subject Bits and bytes
> NG>Function Bin_2_Long(Bin:string):longint;
> Thanks Norbert, It works great. Now My boss wants one to got the other
> way. I need a procedure that take a Byte and turns into a string.
> Bye from Duncan, British Columbia,
Hi Jason, no problem.... (:-))
-------------------------8<---------------------------------
function Byte_2_bin (B:Byte):string;
var s : string;
i : byte;
begin
s := '';
for i := 7 downto 0 do { all possible bit-positions }
if (B and ( 1 shl i )) > 0 { is this bit set ? }
then s := s + '1' { YEAH...}
else s := s + '0'; { no. }
Byte_2_bin := s { return the value }
end;
hmmmm...hey, maybe you need this for WORD and LONGINT also?
before you say no.....here we go...(:-))
function Word_2_bin(W:Word):String;
begin
Word_2_bin := Byte_2_bin( W SHR 8 ) + Byte_2_bin( W and $FF )
end;
function Long_2_bin(L:Longint):String;
begin
Long_2_bin := Word_2_bin( L SHR 16 ) + Word_2_bin( L AND $FFFF )
end;
------------------------->8---------------------------------
Bye from Germany, Norbert
---
* Origin: not available in non-comercial version. Ask for (2:241/5300.3)
* Tossed by SFToss v1.00b on 92/04/28 07:58:45
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 04-27-92 08:48:30
From Dj Murdoch
To Bob Bannon
Subject Re: Pointers as function results (was: P
BB> I just read the tail end of your message lamenting the
BB> inability to create "matrix-like" variables in TP of the
BB> form y[k,j] in the heap. Can you explain (possibly a
BB> repeat of something I missed) the way around that that you
BB> allude to?
The simplest way around it is to create a matrix object. Have it store the
data in whatever way is convenient, and always use methods to access it.
For example, if your arrays will never exceed 64K of data, do it something
like this:
type
PBuffer = ^TBuffer;
TBuffer = array[0..65521 div sizeof(integer)] of integer;
PMatrix = ^TMatrix;
TMatrix = object(TBase)
rows,cols : word;
data : PBuffer;
constructor init(arows,acols:word);
destructor done; virtual;
function getval(i,j:word):integer;
procedure setval(i,j:word;value:integer);
end;
constructor TMatrix.init;
begin
TBase.Init;
rows := arows;
cols := acols;
Getmem(data, rows*cols*sizeof(integer));
end;
destructor TMatrix.done;
begin
Freemem(dat, rows*cols*sizeof(integer));
TBase.done;
end;
function TMatrix.getval;
begin
getval := data^[cols*(i-1) + j];
end;
procedure TMatrix.setval;
begin
data^[cols*(i-1) + j] := value;
end;
This untested code doesn't have the error checks that it should have, and
doesn't run as fast as it could, but it's a start. To use it, you just do
something like this:
var
m : PMatrix;
i,j : word;
begin
New(m, init(30,30));
for i:=1 to 30 do
for j:=1 to 30 do
m^.setval(i,j,random(8));
end.
The ugly example I posted before was trying to do some of the optimization;
I wanted to be able to avoid the far call to SetVal or GetVal on every access.
I'm not that happy with the way I did it.
--- Msg V3.2
* Origin: Murdoch's Point: Waterloo, Ontario, Canada (1:221/177.40)
* Tossed by SFToss v1.00b on 92/04/28 18:20:16
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 04-27-92 09:01:24
From Dj Murdoch
To Keith Reid
Subject Re: FAT writing
DM>Don't do this by editing the FAT. Use Rename, or copy & delete.
KR> Can't do it by Rename, dos will not accept a name with a path for the
KR> destination name.
Try it. The rename procedure does accept a path. It's just COMMAND.COM's
RENAME command that's crippled and won't accept one.
--- Msg V3.2
* Origin: Murdoch's Point: Waterloo, Ontario, Canada (1:221/177.40)
* Tossed by SFToss v1.00b on 92/04/28 18:20:16
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 04-27-92 09:07:11
From Dj Murdoch
To Trevor Carlsen
Subject Re: TP6 "bug"
TC> It appears that TP6 does not calibrate the delay procedure
TC> correctly when used with a fast machine - eg a 486/33. I
TC> would assume that Borland would be aware of this - are you?
Yes, though I thought the problem didn't crop up until you got a little bit
faster than a 486/33. It would certainly happen on a 486/50.
I have the following patch, sent to me by Arno Haket. I haven't applied it
and I don't know exactly what it does; I wish it had been written using the
DEBUG assemble command instead of the edit command.
------------------------------------------------------
4) Delay() patch provided by Borland for 50 MHz 486s:
This is a patch for the CRT unit for Turbo Pascal version 6.0. It takes care
of unpredictable DELAY times on computers faster than 30mhz.
To patch the CRT unit you need to have TURBO.TPL and TPUMOVER.EXE from Turbo
Pascal 6.0, and DELAYPAT.BAT from this ZIP file all in the same directory.
Also DOS's DEBUG must be in the current directory or in the current path.
MAKE THESE CHANGES TO A COPY OF TURBO.TPL NOT YOUR ORIGNAL! DO NOT CHANGE
YOUR ORIGNAL TURBO.TPL ONLY CHANGE YOUR WORKING COPY!
To install the new CRT unit Type: DELAYPAT
When the DOS prompt comes back the installation process is complete. NOTE:
the changes will only affect programs that are compiled after that patch has
been made.
[ DELAYPAT.BAT: ]
Goto Batch
e 8BB 3E
e ADC 59 5B 5A 53 51 90
e AE5 14
e AF1 0E
e AF4 E8 04 00 4A 75 F6 CB BB 04 00 4B 75 FD 26 3A 05 E1 F5
w
q
:Batch
tpumover TURBO.TPL *CRT.TPU
debug CRT.TPU <Delaypat.BAT
tpumover TURBO.TPL +CRT.TPU
del crt.tpu
--- Msg V3.2
* Origin: Murdoch's Point: Waterloo, Ontario, Canada (1:221/177.40)
* Tossed by SFToss v1.00b on 92/04/28 18:20:16
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 04-28-92 00:41:22
From Trevor Carlsen
To All
Subject SBP+
Just reading through the ad for SBP+ again today and I noticed that they claim
that P+ supports ALL memory models. If that is true then the 64k limit for
individual structures should not exist.
Can anybody who uses the product confirm this?
TeeCee
--- TC-ED v2.01
* Origin: The Pilbara's Pascal Centre (+61 91 732569) (3:690/644)
* Tossed by SFToss v1.00b on 92/04/29 07:53:17
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 04-28-92 01:41:47
From Trevor Carlsen
To John Giesbrecht
Subject TP6 "bug"
TC> It appears that TP6 does not calibrate the delay procedure
TC> correctly when used with a fast machine - eg a 486/33.
JG> Do you know if the Delay() procedure in TPCRT/OPCRT (TurboPower) has
JG> the same problem? (I own TPro but nothing like a 486/33 to test it
JG> on.)
The same problem exists with TPro 5.07 and was fixed by 5.11.
OPro 1.12 is Ok. I no longer have the earlier versions of OPro set up on
my disk.
TeeCee
--- TC-ED v2.01
* Origin: The Pilbara's Pascal Centre (+61 91 732569) (3:690/644)
* Tossed by SFToss v1.00b on 92/04/29 07:53:18
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 04-28-92 08:49:57
From Trevor Carlsen
To Dj Murdoch
Subject Re: Help Needed with TP arrays
TC> Actually by declaring the array as large as is possible
TC> this cannot happen. However my view on that method is
TC> that it *might* allow a programmer to become complacent
TC> about writing range checking routines. By forcing him to
TC> turn off automatic range checking, I hope to increase the
TC> awareness of the need for code to do it. Either way the
TC> method can be deadly if no RC code is written and there is
TC> any possibility of out-of-range values.
DM> That attitude seems to me to be exactly backwards. Most programs have
DM> no range checking at all, because Borland defaults TP to $R-, and most
DM> people can't be bothered to do it manually. If people did their
DM> programming with $R+ always turned on, fewer bugs would make it out.
Backwards or not, it is my opinion! (Perhaps that is a direct insight into
my thought processes :-) ) Using your method will never produce a range-check
error and it becomes easier for the method to over-write due to an oversight.
Using mine will *always* produce one if range checking is enabled and hopefully
that in itself will force the programmer to realise the dangers and thus develop
the necessary safety net. I am referring ONLY to code portions using dynamically
allocated arrays.
DM> If you develop programs with the $R- option set, you deserve all the
DM> trouble you can get when you miss doing one manual range check.
Generally speaking I agree and practice exactly that where possible.
TeeCee
--- TC-ED v2.01
* Origin: The Pilbara's Pascal Centre (+61 91 732569) (3:690/644)
* Tossed by SFToss v1.00b on 92/04/29 07:53:18
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 04-28-92 19:47:00
From Terry Hughes
To Rob Kittredge
Subject Re: Looking for
RK>Any plans on including SeaLink sometime in the future? It
RK>is a variation of Xmodem...I have been able to write one
RK>myself but it is nowhere near as fancy as any of Async
RK>Pro's protocols!!! And probably not as reliable either!
Well, it is on the list of things-to-get-to but there are
quite a few things in front of it.
-Terry
* OLX 2.2 * TurboPower Software (voice 719-260-6641)
--- Maximus 2.01wb
* Origin: The Programmers Playhouse (1:128/60)
* Tossed by SFToss v1.00b on 92/04/29 07:53:55
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 04-28-92 00:00:02
From Terry Hughes
To John Giesbrecht
Subject TP6 "bug"
JG>Trevor Carlsen (3:690/644) wrote to dj Murdoch on <26 Apr 07:49>:
JG> TC> It appears that TP6 does not calibrate the delay procedure
JG> TC> correctly when used with a fast machine - eg a 486/33.
JG>Do you know if the Delay() procedure in TPCRT/OPCRT
JG>(TurboPower) has the same problem? (I own TPro but nothing
JG>like a 486/33 to test it on.)
Very early versions of TPRO had a bug in the delay
calibration but that's long been fixed. OPRO's delay
calibration has always been correct on fast machines.
-Terry
* OLX 2.2 * TurboPower Software (voice 719-260-6641)
--- Maximus 2.01wb
* Origin: The Programmers Playhouse (1:128/60)
* Tossed by SFToss v1.00b on 92/04/29 07:53:55
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 04-28-92 00:00:04
From Terry Hughes
To Trevor Carlsen
Subject TP6 "bug"
TC>It appears that TP6 does not calibrate the delay procedure
TC>correctly when used with a fast machine - eg a 486/33. I
TC>would assume that Borland would be aware of this - are you?
Strange. I know older versions of TP had such a problem but I
thought the calibration technique they currently used worked on
fast machines.
I just tested CRT's Delay on my 386/40 here at home and it
worked. Plus, the internal variable DelayCnt (which holds the
number of loops required to wait one millisecond) was only $4B0.
Since this is a word, it should have quite a ways to go before
wrapping -- meaning I'm surprised to see it wrap on a 486/33.
I assume OPCRT's Delay worked OK?
-Terry
* OLX 2.2 * TurboPower Software (voice 719-260-6641)
--- Maximus 2.01wb
* Origin: The Programmers Playhouse (1:128/60)
* Tossed by SFToss v1.00b on 92/04/29 07:53:56
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 04-28-92 20:14:06
From Terry Hughes
To Joshua Kersey @ 930/22
Subject Re: FreePtr
JK@9>-/----- Matt Heck said to All Who Would Be Guru -----\-
JK@9>MH> Can anyone tell me what the TP6.0 equivilant to the TP5.0 FreePtr
JK@9>MH> is?
JK@9>HeapPtr
That's not correct. FreePtr and HeapPtr are quite different.
See the various replies to Matt for an explanation of that
difference.
-Terry
* OLX 2.2 * TurboPower Software (voice 719-260-6641)
--- Maximus 2.01wb
* Origin: The Programmers Playhouse (1:128/60)
* Tossed by SFToss v1.00b on 92/04/29 07:53:56
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 04-28-92 00:00:08
From Terry Hughes
To John Gohde
Subject Re: Freeptr
JG>*Can anyone tell me what the TP6.0 equivilant to the TP5.0 FreePtr is?
JG>Yeah, try:
JG> Var FreePtr: Pointer;
JG> FreePtr := Ptr(Seg(HeapEnd^)-$1000,0);
JG>And by the way, this solution is from a DOC included with TP6.0.
That would only work if the objective of the code
referencing FreePtr was to return the top of memory. And
even in those cases where it would return a reasonable
result the entire purpose behind the calculation is moot.
That is, you'd have a couple of calculations that
essentially do nothing. And it doesn't address at all those
cases where a program needs to set FreePtr or peek at the
free list directly.
I couldn't find that suggestion in my TP6 docs so I assume
it's something Borland added in later shipping releases of
TP6. I hope it was accompanied by some warnings about its
limitations.
-Terry
* OLX 2.2 * TurboPower Software (voice 719-260-6641)
--- Maximus 2.01wb
* Origin: The Programmers Playhouse (1:128/60)
* Tossed by SFToss v1.00b on 92/04/29 07:53:56
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 04-28-92 09:09:55
From Dj Murdoch
To Matt Heck
Subject Re: FreePtr
MH> Rats. In what way does the heap manager differ from 5.0?
Instead of an array of records describing the holes in memory (the so called
Free List in TP 4.0-5.5), TP 6.0 puts the records in the holes, and links
them into a list.
MH> What I need to do is figure out how much memory to reserve for a TSR,
MH> like this:
MH> ResPara := Seg(FreePtr^)+$1000-PrefixSeg; {
MH> number of paragraphs }
MH> What would be the corresponding 6.0 method?
ResPara := Seg(HeapEnd) - PrefixSeg;
should work, but I haven't tested it.
it is we are), who had a primitive savage belief in...
CP>some things in this world that cannot be explained, and
some things that wil CP>never be explained by our scientists, IMHO.
Quite true. Doesn't mean God did it.
CP>I'm positive most of them would most likely be killed or seriously hurt, but
CP>some would live I would think.
CP>But you're talking about 3 million couples. That just makes that one inciden
CP>Alan brought up sound even better. That ONE incident was a miracle. I'm sure
You don't understand statistics. Let me explain. Think of it this
way: If I make a million sided dice, and it comes up on a million,
1000 times on 1000000 throws, you probably would call that chance, and
not a miracle. However, if the number 1,000,000 has some special
significance (as does people surviving bad accidents) and I throw the
dice once and it comes up on a million, does that make it a miracle?
Hardly. Just one of a million different possibilities, and in the
case of the car accident, it's the same thing, although there are a
different number of possible outcomes (possibly more? The car flips
on its front, it's back, it's back by 90 degrees, by 89.999 degrees,
etc)
CP>the family members of those that survived that ordeal would
agree with that.
If I get a bunch of Zulu warriors and ask them if they agree on their
religious beliefs, does that make them right in your eyes? In some
things, opinion polls mean didly. If I get all of those people to
somehow think that I saved their families by farting at the exact same
time as the accident (which is entirely possibly if I've been eating
something noxious), it proves nothing, save for their gullibility.
* SLMR 2.0 * Early one June morning in 1872 I murdered my father --
--- SuperQWK 1.16 Beta-5 (Reg)
* Origin: Starship Enterprise - SuperBBS Support/Registration (1:221/187)
* Tossed by SFToss v1.00b on 92/04/29 15:57:11
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 04-28-92 09:16:33
From Dj Murdoch
To J J Marquez
Subject Re: Turbo 5.5 doesn't re
JJ> I am still not convinced of it's "smarts" in this
JJ> matter. If I use the TEST8087 dealie in a CASE statement,
JJ> does that not constitute "needing to use it" in order to
JJ> use the TEST8087 variable (well, CONSTANT, actually...)
JJ> with any success ??
Here are two justifications:
1. The lawyer's justification:
The TEST8087 variable is performing exactly as documented. It isn't supposed
to tell you what sort of coprocessor you've got, it's supposed to tell you
the result of the detection logic. If you don't have the $N+ option set,
the logic doesn't see a thing.
2. The mechanic's justification:
The TEST8087 variable isn't data used by the floating point code, it's a part
of the regular system variables. Looking at it doesn't pull in the detection
code any more than looking at any of the Ovr* variables forces your program
to be overlaid.
--- Msg V3.2
* Origin: Murdoch's Point: Waterloo, Ontario, Canada (1:221/177.40)
* Tossed by SFToss v1.00b on 92/04/30 07:10:20
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 04-28-92 09:57:41
From Dj Murdoch
To Dj Murdoch
Subject Re: Turbo 5.5 doesn't re
DM> 1. The lawyer's justification:
DM> The TEST8087 variable is performing exactly as documented.
DM> It isn't supposed to tell you what sort of coprocessor
DM> you've got, it's supposed to tell you the result of the
DM> detection logic. If you don't have the $N+ option set,
DM> the logic doesn't see a thing.
Ooops, I mean if you have $N+ set, but don't use anything that needs the floatin
point code, the logic doesn't see a thing.
--- Msg V3.2
* Origin: Murdoch's Point: Waterloo, Ontario, Canada (1:221/177.40)
* Tossed by SFToss v1.00b on 92/04/30 07:10:20
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 04-29-92 20:34:00
From Norbert Igl
To Daniel Schlenzig
Subject Soundblaster
>> I think that was the right port... if that doesn't work, maybe it was
>> 544, 540, or 550.
> The Soundblaster DSP accessing port is 2xCh, where x is the setting
> of the jumper (2, 3, 4).
544 <=> 220 !!!
(10) (16)
Bye from Germany, Norbert
---
* Origin: Let's talk about hex, baby.... (2:241/5300.3)
* Tossed by SFToss v1.00b on 92/04/30 07:10:32
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 04-30-92 01:15:01
From Trevor Carlsen
To Terry Hughes
Subject TP6 "bug"
TC>It appears that TP6 does not calibrate the delay procedure
TC>correctly when used with a fast machine - eg a 486/33. I
TC>would assume that Borland would be aware of this - are you?
TH> Strange. I know older versions of TP had such a problem but I
TH> thought the calibration technique they currently used worked on
TH> fast machines...
TH> ... I assume OPCRT's Delay worked OK?
Sure did! So did TPro's (version 5.11) but just for curiosity I also tested
TPro 5.07 and it was incorrect.
TeeCee
--- TC-ED v2.01
* Origin: The Pilbara's Pascal Centre (+61 91 732930) (3:690/644)
* Tossed by SFToss v1.00b on 92/04/30 20:36:21
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 04-30-92 01:21:53
From Trevor Carlsen
To Shelby Crane
Subject Re: $80?
SC> How did you figure the haxadecimal number? I know that the
SC> $60 is the keyboard but I'm not sure why it is comparing it
SC> to the $80 which I have no idea what is.
Port[$60] contains details of the last keypress/keyrelease. If the msb is
set it indicates a release rather than a press. Therefore any value of $80
or higher indicates a key release.
TeeCee
--- TC-ED v2.01
* Origin: The Pilbara's Pascal Centre (+61 91 732930) (3:690/644)
* Tossed by SFToss v1.00b on 92/04/30 20:36:21
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 04-30-92 01:28:18
From Trevor Carlsen
To J J Marquez
Subject Re: dectecing coprocessor
JM> ... Inclusion and use of the TEST8087 item in a user program
JM> ought to work, even if you do nothing else...
If that means linking in what is really unnecessary code then I disagree with
you. I prefer the smart linking.
JM> ... Or, AT LEAST have the docs clearly tell you that it
JM> won't work without the other code present.
To my way of thinking that is the correct way to do it.
TeeCee
--- TC-ED v2.01
* Origin: The Pilbara's Pascal Centre (+61 91 732930) (3:690/644)
* Tossed by SFToss v1.00b on 92/04/30 20:36:21
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 04-30-92 01:45:11
From Trevor Carlsen
To Jud Mccranie
Subject Re: Features Lacking In Tp
TC> mickey-mouse language. If you do not like something you should
TC> not buy it.
JM> Many times we can't get a look at something first...
If the product is not too new it is usually easy enough to find reviews or
somebody that can demonstrate it. If - as in the case of SBP+ - it is advance
advertising of a product yet to be released and inviting orders then the best
way to go is write a letter requesting details of points not made clear or
omitted in the ads.
In Australia, and I think the same applies in the US, there is consumer legislat
on that allows you to return the product for refund if it does not stand up
to claims or is unsuitable for the use it is intended for.
TeeCee
--- TC-ED v2.01
* Origin: The Pilbara's Pascal Centre (+61 91 732930) (3:690/644)
* Tossed by SFToss v1.00b on 92/04/30 20:36:21
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 04-30-92 02:23:09
From Trevor Carlsen
To Rob Kittredge
Subject Borland, OS/2 2.0, and you
RK> I have purchased a copy of Borland C++ 3.0 and it *IS* a nice compiler
RK> but currently all of my programs are written in Turbo Pascal and it
RK> would take me years to convert them to C++ so I could run under OS/2.
RK> Well, thanks for your message it's interesting to hear what other
RK> people are thinking about this tragedy :-)
I wish I was as sure of winning Lotto as I am that an OS/2 version of TP (or
a TP compatible) will not be far away. I think it just a matter of being patient
TeeCee
--- TC-ED v2.01
* Origin: The Pilbara's Pascal Centre (+61 91 732930) (3:690/644)
* Tossed by SFToss v1.00b on 92/04/30 20:36:21
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 04-30-92 02:37:51
From Trevor Carlsen
To Chris Kelling
Subject Re: Help Needed with TP arrays
TC> you obviously disagree, why not prove your point of view? :-)
CK> Why do you say that is not true dynamic varibales. The burden of
CK> proff is on you...
Yeah I guess it is :-)
By definition something that is dynamic is subject to change. In the subject
at hand I take that to mean that an array can be dimensioned dynamically at
run-time. This is not possible in TP. The following will not compile -
var
Thearray : array[0..max] of byte;
*if* max is not a constant. However as has been demonstrated there are ways
around this restriction. All involve dynamically allocating only as much
memory as is needed for the "dynamic array" on the heap. Methods differ slightl
on how to go about this, but one thing is constant - the programmer MUST
write bound checking code or face disaster, as TP's range checking is of no
use here.
TeeCee
--- TC-ED v2.01
* Origin: The Pilbara's Pascal Centre (+61 91 732930) (3:690/644)
* Tossed by SFToss v1.00b on 92/04/30 20:36:21
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 04-30-92 19:54:15
From Trevor Carlsen
To Jud Mccranie
Subject Re: Features Lacking In Tp
DM> I don't see any need for static data greater than 64K, but I'd
JM> Well, it is much easier and faster if you have data
JM> available in memory, and if you have more than 64K of it,
JM> you need more than 64K.
Data on the heap is just as much in memory as any other. It is slower to
access, but no user would ever detect that as microseconds only are involved.
I consider that it is desirable to have individual structures that can exceed
a segment but I still see no justification for global data space exceeding
that. Your comment that it is MUCH easier and faster just doesn't hold up.
Here are some interesting results of writing data to a 60K structure on the
heap and also statically. Each element is written individually 100 times
so that is 6.144 million data writes - something that just doesn't happen
in real life applications.
To static memory - 2.6095 seconds
To dynamic memory - 3.9142 seconds
or a difference of 1/5th of a microsecond (213 nanoseconds) per element!
Even though that is on a fast machine, even on a 4.77mHz PC it is still hardly
what I would call worth worrying about. However in a big structure which
can easily require operations of the order of 100s of thousands read/writes
in a sort or similar, the overhead involved because of the segment limitation
on single structures becomes highly significant.
TeeCee
--- TC-ED v2.01
* Origin: The Pilbara's Pascal Centre (+61 91 732930) (3:690/644)
* Tossed by SFToss v1.00b on 92/04/30 20:36:22
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 04-30-92 20:02:25
From Trevor Carlsen
To Damian Slee
Subject Saving Screens
TC> may cause a "snow" effect. This can be countered by only
TC> doing accesses between vertical retraces. As such cards are
TC> relatively rare now, most do not bother.
DS> What does this mean, any how do I implement it?
Any direct access of video RAM during a vertical retrace scan causes a "snow"
effect. To avoid this the access should examine the video controller's register
to determine when it is safe to do the write. On a 4.77mHz PC about 900
characters can be written in the "safe" time. Any attempt to disable the
scan for more than one scan will result in noticeable flicker.
A good book to read if you need more information is Richard Wilton's "Programmer
s Guide to PC and PS/2 Video Systems"
EGA and VGA cards, along with most CGA cards do not have the problem as their
circuitry is already designed to prevent the problem.
TeeCee
--- TC-ED v2.01
* Origin: The Pilbara's Pascal Centre (+61 91 732930) (3:690/644)
* Tossed by SFToss v1.00b on 92/04/30 20:36:22
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 04-29-92 09:09:30
From Dj Murdoch
To Richard Morris
Subject Re: Turbovision - Off Topic?
RM> Spell checking, know any good flat dictionaries?
Not a flat one, but I have code to read the PC Write dictionary of a few version
ago.
--- Msg V3.2
* Origin: Murdoch's Point: Waterloo, Ontario, Canada (1:221/177.40)
* Tossed by SFToss v1.00b on 92/05/01 06:17:11
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 04-29-92 18:25:00
From Dj Murdoch
To daniel prosser
Subject Re: Chaining interrupts
> Does anyone have a procedure or asembly source that will allow
> chaining
> of interrupts in pascal WITHOUT using SetIntVec, since that calls INT
> 21h and therefore making it impossible to Chain INT 21h. Any help
> would
> be appreciated!
DP> You can take over INT 21h with the standard int 21h function 35h...
DP> and I think it is also possible to change it with SetIntVect
One thing to watch out for if you take over INT 21: you can't use the regular
TP interrupt routine exit code. It ends with an IRET; that'll wipe out the
flags being returned by INT 21. You need to rewrite it to return with a RETF 2.
--- Msg V3.2
* Origin: Murdoch's Point: Waterloo, Ontario, Canada (1:221/177.40)
* Tossed by SFToss v1.00b on 92/05/01 06:17:11
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 05-01-92 03:53:34
From Trevor Carlsen
To Benjamin Schollnick
Subject Re: Procedures...
BS> And I've found some strange stuff in the code I'm rewriting...
BS> Who agrees with this practice?
BS> Repeat
BS> Until True = False;
BS> That's _crazy_....The loop never be halted except by a HALT, or
BS> MAYBE a exit....And that's totally against everything I've learned
BS> and taught!
That is a perfectly valid technique. I use it frequently in input loops where
it can make the code cleaner and more readable. Usually I add a comment like -
{ halt occurs in procedure ProcessInput if escape key pressed }
Sometimes the halt might occur in several different places. There are all
sorts of reasons and most are perfectly valid.
BTW... Please clean up your quoting. Do not quote the kludge lines.
TeeCee
--- TC-ED v2.01
* Origin: The Pilbara's Pascal Centre (+61 91 732930) (3:690/644)
* Tossed by SFToss v1.00b on 92/05/01 21:05:54
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 05-01-92 04:03:57
From Trevor Carlsen
To Roger Joelsson
Subject Sources for Mailer
BS> BT is written in C, but translating to Pascal isn't too
BS> dificult, it just takes a *long* time...
RJ> Well, it isn't *too* easy, but I'm sure that the code would be less
RJ> efficient written i Turbo Pascal, rather than compiled with MS C
RJ> 6/7.0?
RJ> Anyone who disagrees in this matter? :-)
Yes...me! :-)
It seems a common belief that C programs, especially those compiled with an
optimising compiler such as MS C, are inherently more efficient and/or faster
than Turbo Pascal programs.
This is not necessarily so.
Most TP programs will be smaller in .exe size than C programs. Many will
also be faster although this is dependant on the type of operation being perform
d. You certainly cannot make blanket statements such as you have done above
and be accurate. Sometimes such statements will be true and sometimes false.
TeeCee
--- TC-ED v2.01
* Origin: The Pilbara's Pascal Centre (+61 91 732930) (3:690/644)
* Tossed by SFToss v1.00b on 92/05/01 21:05:54
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 05-01-92 04:13:40
From Trevor Carlsen
To Keith Dombrowski
Subject Re: EMS w/Overlays
DM> It's probably because you're not executing the exit
DM> procedure properly. That can happen if you quit partway
DM> through the program in the IDE, or if you install a new exit
DM> procedure that doesn't call the old one.
KD> Well, actualy it never happens in the IDE, but the second one may
KD> be the ticket, the door library I am using has it's own exit procedure
KD> and as I don;t have the source, I can't tell if it is executing the
KD> default one. Thanks for the info, I'll have to send the author a
KD> netmail about it.
Hard-fast-rule-number-1.
NEVER use units written by third parties if you do not have the source!
However that is not going to solve your problem here by being wise after the
event. :-) So make your own little exit procedure and place it in its own
unit. Make that unit the *first* unit in your uses declarations. If it is
not being executed then the other unit is not chaining back properly.
TeeCee
--- TC-ED v2.01
* Origin: The Pilbara's Pascal Centre (+61 91 732930) (3:690/644)
* Tossed by SFToss v1.00b on 92/05/01 21:05:54
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 05-01-92 04:20:14
From Trevor Carlsen
To Humberto Garza
Subject Joystick
HG> Function BitOn(Position, TestByte : Byte) : Boolean;
HG> (* Individual Bit Testing function *)
HG> Var
HG> bt : byte;
HG> Begin
HG> bt := $01;
HG> bt := bt Shl Position;
HG> BitOn := (bt And TestByte) > 0;
HG> End;
Better here would be -
function BitOn(Position, TestByte):boolean;
begin
BitOn := odd(TestByte shr Position);
end;
BTW ... Hi-bit characters are not permitted in this echo. Please amend your
quoting style appropriately. There is also a hi-bit character in your reader's
brag line.
TeeCee
--- TC-ED v2.01
* Origin: The Pilbara's Pascal Centre (+61 91 732930) (3:690/644)
* Tossed by SFToss v1.00b on 92/05/01 21:05:54
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 05-01-92 05:08:45
From Trevor Carlsen
To Stevo Wierengo
Subject BBS Lockup 2/6
Steve, I can't solve your lock-up problems but perhaps the following suggestion
might help -
SW> ban := UpCase(readportkey);
Why change the charcater to upper case when later in the program you exert
a great deal of effort to change it to lower case?
SW> If ban = 'A' then ban := 'a' else if ban = 'B' then
SW> ban
SW> Else if ban = 'C' then ban := 'c' else if ban = 'D'
SW> Else if ban = 'E' then ban := 'e' else if ban = 'F'
SW> Else if ban = 'G' then ban := 'g' else if ban = 'H'
etc...
However if it is essential that you change to upper case and then back all
of these lines could be replaced by
ban := LowCase(ban);
with the relevant function being;
function LowCase(var ch): char;
begin
case char(ch) of
'A'..'Z': LowCase := chr(byte(ch) and $df);
end;
end;
TeeCee
--- TC-ED v2.01
* Origin: The Pilbara's Pascal Centre (+61 91 732930) (3:690/644)
* Tossed by SFToss v1.00b on 92/05/01 21:05:54
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 05-01-92 05:26:52
From Trevor Carlsen
To Stevo Wierengo
Subject BBS Lockup 6/6
SW> PROCEDURE FormatUD;
SW> Begin
SW> FillChar(ud.user, (SizeOf(ud.user)-Length(ud.user)),' ');
SW> FillChar(ud.pw, (SizeOf(ud.pw)-Length(ud.pw)),' ');
SW> FillChar(ud.ph1, (SizeOf(ud.ph1)-Length(ud.ph1)),' ');
SW> FillChar(ud.ph2, (SizeOf(ud.ph2)-Length(ud.ph2)),' ');
SW> FillChar(ud.add1, (SizeOf(ud.add1)-Length(ud.add1)),' ');
SW> FillChar(ud.city, (SizeOf(ud.city)-Length(ud.city)),' ');
SW> FillChar(ud.state, (SizeOf(ud.state)-Length(ud.state)),' ');
SW> FillChar(ud.zip, (SizeOf(ud.zip)-Length(ud.zip)),' ');
SW> FillChar(ud.born, (SizeOf(ud.born)-Length(ud.born)),' ');
SW> FillChar(ud.ansi, (SizeOf(ud.ansi)-Length(ud.ansi)),' ');
SW> FillChar(ud.bank, (SizeOf(ud.bank)-Length(ud.bank)),' ');
SW> FillChar(ud.dls, (SizeOf(ud.dls)-Length(ud.dls)),' ');
SW> FillChar(ud.uls, (SizeOf(ud.uls)-Length(ud.uls)),' ');
SW> FillChar(ud.times, (SizeOf(ud.times)-Length(ud.times)),' ');
SW> FillChar(ud.level, (SizeOf(ud.level)-Length(ud.level)),' ');
SW> End;
This monstrosity could be eliminated by a simple:
procedure FormatUD;
begin
FillChar(ud,sizeof(ud),0);
end;
placed at the start of your procedure.
--- TC-ED v2.01
* Origin: The Pilbara's Pascal Centre (+61 91 732930) (3:690/644)
* Tossed by SFToss v1.00b on 92/05/01 21:05:54
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 05-01-92 15:49:50
From Trevor Carlsen
To Benjamin Schollnick
Subject Re: Procedures...
TC> JS> If ParamCount <> 3 then begin
TC> JS> ClrScr ;
TC> JS> WriteLN('To use this program you MUST have 3 arguments to
TC> JS> WriteLN('Program what you want it to do!') ;
TC> JS> WriteLN('Test -A -B -C') ;
TC> JS> Exit ; { Wrong Parameter count! Abort! }
TC> JS> end ;
TC> JS> ...
TC> JS> ... { Program Code here. }
TC> JS> ...
TC> JS> End.
BS> Would cause a bomb instead of exiting the "Main" code...Because it
BS> would return to the main block, and "not trap the error"....Halt
BS> would of been the correct use as I showed in my reply...
Whilst I agree with your suggestion that the use of halt instead of the exit
is preferable, the above statement of yours is incorrect. In the above case
the exit
"Exits immediately from the current block.
Syntax:
Exit;
If the current block is the main program, Exit
causes the program to terminate." (from help file).
TeeCee
--- TC-ED v2.01
* Origin: The Pilbara's Pascal Centre (+61 91 732930) (3:690/644)
* Tossed by SFToss v1.00b on 92/05/01 21:05:54
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 05-01-92 22:21:00
From Werner Berghofer
To Roger Joelsson
Subject SAA/CUA standards
Hi, Roger.
> Do you know where to get some of these books?
> Are they "publicly" available from IBM?
Yes, they are -- at least here in the country where I live. Contact
any IBM authorized dealer, I think he should be able to order these books
from IBM for you. Probably you also will be able to order the books in a
book store spezialized in EDP related topics.
> That DOS Shell program that comes with MS-DOS 4.01 and 5.0,
> isn't it a typical example on implenting SAA/CUA?
The DOS 5.0 shell is more typical for SAA/CUA than the 4.x shell was;
another good example for this kind of user interface is DOS 5.0's QBASIC.EXE
(aka EDIT.COM) and OS/2 1.3 Presentation Manager (didn't have a chance to
look at OS/2 2.0 PM yet, sorry).
> (greetings from Sweden!)
The same to you from Vienna, Austria.
Werner.
---
* Origin: Real programmers use COPY CON PROGRAM.EXE (2:310/90.100)
* Tossed by SFToss v1.00b on 92/05/02 15:11:29
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 05-01-92 23:06:51
From Trevor Carlsen
To All
Subject 16550 chip
Does anybody have any Pascal (or assembler) code that will demonstrate a fool-pr
of way of determining if the UART is a 16550, 16450 or 8250?
TeeCee
--- TC-ED v2.01
* Origin: The Pilbara's Pascal Centre (+61 91 732930) (3:690/644)
* Tossed by SFToss v1.00b on 92/05/02 15:11:52
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 05-02-92 12:35:46
From Trevor Carlsen
To Matt Heck
Subject Borland, OS/2 2.0, and you
MH> Is there any point to a 286 with 640k and a 40MB HDD running OS/2?
None at all, mainly because it will not run on a 286. OS/2 2.0 is a 32 bit
system specifically coded for 386/486 operation.
MH> And either way, are the rest of you planning to program for it,
MH> thereby attempting to force us to shell out more cash?
I'll wait and see. However when TP is released for OS/2 then I will definitely
buy it for a look. If the demand is there, then there is no decision required.
TeeCee
--- TC-ED v2.01
* Origin: The Pilbara's Pascal Centre (+61 91 732930) (3:690/644)
* Tossed by SFToss v1.00b on 92/05/02 15:11:52
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 05-02-92 12:45:29
From Trevor Carlsen
To John Gohde
Subject A Virtuous Pascal ...
JG> POINT ONE: TP4 has more than enough features to keep a first time
JG> non-genius casual programmer busy for one year of devoted study.
Agree 100%. Well put.
JG> POINT TWO: There is a market for a simple and stable real world
JG> version of Pascal...
Agree 100% - again!
JG> POINT THREE: Why pay for features and learn features that will be
JG> out of date by the time you get around to using them for the
JG> first time?
JG> In other words, why pay for TV version 6 if you wont use TV until
JG> version 7 or 8 exists?
Three in a row!
JG> POINT FOUR: There is a market segment who would buy TP4 at USA$40
JG> rather than TP6 at USA$110, if they had that option. And, this
JG> alleged FACT has nothing whatsoever to do with Borland TP
JG> propaganda.
You been reading my mind?
JG> POINT FIVE: The availability of a good, simple, and stable Pascal
JG> at USA$40 would ONLY tend to promote the use of PASCAL as a
JG> programming language; whereas the current marketing practises of
JG> Borland MAY not have the promotion of Pascal as a programming
JG> language as a priority.
I hate to say this - but that's five.
You have just determined that there is a niche market that would almost certainl
be quite lucrative... Go for it.
(See? when you stick to facts and objectivity you and I CAN agree :-) )
TeeCee
--- TC-ED v2.01
* Origin: The Pilbara's Pascal Centre (+61 91 732930) (3:690/644)
* Tossed by SFToss v1.00b on 92/05/02 15:11:52
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 05-02-92 17:21:47
From Trevor Carlsen
To Lee Cassar
Subject Need some help
LC> I need some help. I want to know how to turn on and off the locks on
LC> the keyboard(scroll, num, and caps) using a turbo pascal routine.
LC> Does anyone have any ideas?
LC> (I have turbo Pascal 6.0 Professional)
type
shiftstatus = set of (RightShift, LeftShift, Ctrl, Alt,
ScrollLock, NumLock, CapsLock, InsertOn);
var
KbdStatus : shiftstatus absolute $40:$17;
Eg. To turn caps lock on -
KbdStatus := KbdStatus + [CapsLock];
To turn it off -
KbdStatus := KbdStatus - [CapsLock];
TeeCee
--- TC-ED v2.01
* Origin: The Pilbara's Pascal Centre (+61 91 732930) (3:690/644)
* Tossed by SFToss v1.00b on 92/05/02 15:11:52
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 05-02-92 17:32:39
From Trevor Carlsen
To Greg Belanger
Subject Encryption of sorts..
GB> I'm lookin for a way to Encrypt various aspects of my programs. For
GB> example, I know it's quite easy to use a HEX editor and go in and edit
GB> the program name, autor and copyright info. Is there a way to make
GB> this "text" unmodifiable? I'm looking for a nice, simple routine..not
GB> 400 lines of encryption code. Any suggestions?
By far the easiest and safest way of doing what you want is to place all textual
information used by your program in a file and encrypt that file. Unencrypt
it during the initialisation routine.
Doing it this way will also solve the problem that arises when self modifying
files are used with things like foreign languages, overlays, PkLite etc.
Special foreign language editions are simply made just by providing a specific
file for that language.
To create the file just create a typed file of string[80] and use record zero
as a header in which you can store data such as random number generator seeds,
passwords etc. All this is very simple to do. Here is a simple program to
encrypt such a file and the function to place in the program to unencrypt
the respective string. It is by no means unbreakable but will certainly represe
t more trouble to work out what you are doing than it is worth!
{$X+}
program encrypt;
uses crt;
var f : file of string[80];
txt : text;
st : sting[80];
key : longint;
SavedKey : longint absolute st;
procedure EncryptStr(var st: string[80]);
var x : byte;
begin
for x := 1 to length(st) do
st[x] := char(st[x] xor random(256);
end;
begin
Randomize;
assign(f,'TheFile.cfg');
rewrite(f);
assign(txt,'RawText.txt');
reset(f);
writeln('Press any key to continue...');
repeat
key := key xor Random(MaxInt) * Random(MaxInt);
until Keypressed;
SavedKey := key;
RandSeed := key;
write(f,st);
repeat
ReadLn(txt,st);
EncryptStr(st);
write(f,st);
until eof(txt);
close(f);
close(txt);
end.
Untested.
To unencrypt just read the first 4 bytes of the first record into a longint,
use that longint as your RandomSeed and then use the above Encrypt procedure
to unencrypt the string.
TeeCee
--- TC-ED v2.01
* Origin: The Pilbara's Pascal Centre (+61 91 732930) (3:690/644)
* Tossed by SFToss v1.00b on 92/05/02 15:11:52